//
//  NetworkTools+User.swift
//  FWSinaWeibo
//
//  Created by 范伟 on 16/2/25.
//  Copyright © 2016年 FanWei. All rights reserved.
//

import Foundation

extension NetworkTools {
    /**
     网络请求用户信息
     
     - parameter accessToken: 用户令牌accesToken (OAuth授权后获得)
     - parameter uid:         需要查询的用户ID
     - parameter finished:    网络完成后的回调
     */
    func loadUserInformation(accessToken: String, uid: String, finished: (result: [String: AnyObject]?) -> ()) {
        let urlString = "https://api.weibo.com/2/users/show.json"
        let params = ["access_token": accessToken, "uid": uid]
        request(.GET, urlString: urlString, parameters: params, finished: finished)
    }
}